package com.yuyou.tas.report.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.yuyou.tas.service.api.lesson.dto.LessonClassPageDTO;
import com.yuyou.tas.service.api.report.entity.ExamModelRange;

@Mapper
public interface ExamModelRangeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ExamModelRange record);

    ExamModelRange selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ExamModelRange record);

    List<ExamModelRange> getByOrganId(@Param(value = "organId") Long organId);
    
    /**
     * 根据班级删除
     * @param lessonClassId
     * @param authOrganizationId
     * @return
     */
    int deleteByClassId(@Param(value = "lessonClassId") Long lessonClassId,@Param(value = "authOrganizationId") Long authOrganizationId);

    int deleteByExamModelId(@Param(value = "examModelId") Long examModelId);

    int deleteByExamModelIdCreateUser(@Param(value = "examModelId") Long examModelId, @Param(value = "createUser") Long createUser);

    int deleteByCreateUserAndNotInClassIds(@Param(value = "examModelId") Long examModelId, @Param(value = "createUser") Long createUser,
                                           @Param(value = "classIds") List<Long> classIds);

    List<LessonClassPageDTO> findLessonClassIdsByExamModelId(@Param(value = "examModelId") Long examModelId, @Param(value = "userId") Long userId);

    int countByExamModelId(@Param(value = "examModelId") Long examModelId);
}